﻿<script src="~/vue/dist/vue.global.js"></script>
<link href="~/element-plus/dist/index.css" rel="stylesheet" />
<script src="~/element-plus/dist/index.full.js"></script>
<script src="~/axios/dist/axios.js"></script>
<html>
<head>
    <link href="~/css/table.css" rel="stylesheet" />
</head>
<body>
    <div id="app">
        <input type="hidden" name="page.startPage" value="0">
        <table width="100%">
            <tr>
                <td>
                    <font color="black">您正在做的业务是：人力资源--薪酬发放管理--薪酬发放登记</font>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <el-button v-on:click="edit()">确定</el-button>
                </td>
            </tr>
        </table>
        <table width="100%" border="1" cellpadding=0 cellspacing=1
               bordercolorlight=#848284 bordercolordark=#eeeeee
               class="TABLE_STYLE1">
            <tr>
                <td width="27%" class="TD_STYLE1">
                    薪酬发放方式
                </td>
                <td width="22%" class="TD_STYLE1">
                    <el-select v-model="value"
                               placeholder="请选择薪酬发放方式"
                               size="small"
                               class="INPUT_STYLE2">
                        <el-option v-for="item in options"
                                   :key="item.pbcId"
                                   :label="item.attributeName"
                                   :value="item.pbcId" />
                    </el-select>
                </td>
                <td width="60%" class="TD_STYLE1"></td>
        </table>
    </div>
</body>
</html>
    <script>
        const { createApp, ref, reactive } = Vue
        const { ElMessage } = ElementPlus
        var app = createApp({
            setup() {
                const value = ref('')

                const options = [
                    {
                        pbcId : 1,
                        attributeName : "一级机构发放方式"
                    },{
                        pbcId : 2,
                        attributeName : "二级机构发放方式"                                                      
                    },{
                        pbcId : 3,
                        attributeName : "三级机构发放方式"
                    },
                ]

                function edit(){
                    if (value.value == ""){
                        ElMessage({
                        type: 'error',
                        message: '请选择薪酬发放方式！'});
                    }else{
                        window.location.href ="/SG/SGJGSelect?num="+value.value
                    }
                }

                // function selectOption(){
                //     axios.get("/SG/SGSelectOption").then(res =>{
                //         options.value = res.data
                //     }).catch(error =>{
                //         console.info(error)
                //     })
                // }
                // selectOption()

                return {
                    value,options,edit
                }
            }
        })
        app.use(ElementPlus)
        app.mount("#app");
    </script>          